# name : surv.consist.prob.fun
# key: surv.prob.consist.fun
# key: surv.consist.prob.fun
# contributor: Shuguang Sun
# --
${1:hrconst} <- function(x) {
  bd <- 1 - (1 - x$hr) * x$perc
  p <- qnorm(q = log(bd), mean = log(x$hr), sd = (1 + x$r)/sqrt(x$e * x$r))
  p
}
$1(x)